<?php
/*
 * 车险模块的数据库操作类
 * @package
 * @author     Json
 * @copyright  Copyright (c) 2013 ixdcw team
 * @version    $Id: 3d44d2570d5e92ce096691af52300766ccbaf4b2 $
 */
defined('IN_IXDCW') or exit('Access Denied');
final class AutoInsuranceDb extends CoreDb{


	public function __construct(){
		parent::__construct();
	}


	public function getFields(){
		return $this->fields(true);
	}


	/**
	 * 获取一条数据
	 * @param string $itemid
	 * @return array
	 */

/*	public function getByitemid($itemid) {
		$sql = "
			SELECT *
			FROM {$this->tableName()}
			WHERE itemid='".$itemid."'";
		return $this->_db->getOne($sql);
	}*/

	/**
	 * 添加数据
	 * @param array $post
	 * @return bool
	 */

	public function add($post) {
		return $this->_db->query(Sql::insert($this->tableName(), $post, $this->getFields()));
	}


}